<?php

header("content-Type: text/html; charset=utf-8");

include("conn.php");


$name= $_POST['name'];

$email= $_POST['email'];

$content  = $_POST['content'];

$sql = "
INSERT INTO  message (
id ,
usename ,
email  ,
 content 
)
VALUES (
NULL ,  '$name',  '$email',  '$content'
);
";



// select * from admin where username='a' or '1=1' and ;



$result = $conn->query($sql);

if ($result->num_rows > 0) {  
	$rows = array();
	while($row = $result->fetch_assoc()) {
            array_push($rows, $row);        
    }
    
    header("location:show.php");
}else {
	header("location:show.php");
}


?>

